package com.wantupai.translate.utils;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * @author luxuchang
 * @date 2019/4/28 0028
 * @description
 */
public class ImgUtils {

    public static Bitmap img2Bitmap(String path) {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream(path);
            Bitmap bitmap = BitmapFactory.decodeStream(fis);
            return bitmap;
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        return null;
    }
}
